# 编译阶段
FROM node:14.21.3-alpine3.17

WORKDIR /app
COPY . .

RUN npm config set registry https://registry.npmmirror.com && \
    npm install && \
    chmod -R 777 ./

# 暴露端口
ENV PORT=5138
EXPOSE 5138

## 启动命令
ENTRYPOINT ["npm", "run", "develop"]

LABEL 原项目地址="https://github.com/vzhou842/example-.io-game"
LABEL 镜像制作者="https://space.bilibili.com/17547201"
LABEL GitHub主页="https://github.com/Firfr/mp_game"
LABEL Gitee主页="https://gitee.com/firfe/mp_game"

# docker buildx build --platform linux/amd64 --tag firfe/mp_game:2025.08.25 --load .
# docker buildx build --platform linux/arm64 --tag firfe/mp_game:2025.08.25-arm64 --load .
